﻿using Authentication.Model.Model;
using Common.Contract;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Authentication.Model.Interface
{
    public interface IUserProvider
    {
        IEnumerable<Account> RetrieveUsers(string applicationKey = null);

        IEnumerable<Account> RetrieveUsers(out int totalRecord, Guid? applicationKey = null, string groupidentifier = null, string username = null, bool? active = null, int pagesize = 0, int pageindex = 0);

        Account RetrieveUser(Guid applicationKey, string userName);

        Account RetrieveUserByEmail(Guid applicationKey, string email);

        bool AddUser(Account record);

        bool UpdateUser(Account record);

        bool UpdateUserInfo(AccountInfo record);

        ResponseRecord CheckRulePassword(string username, string password);

        long GetMaxAccountLogonAuditID(Guid applicationKey, string username);

        void AddAccountLogonAudit(AccountLogonAudit userLogonAudit);
    }
}
